<template>
  <div class="movie-container">
    <PageHeader :title="title" />
    <div class="content-wrapper">
      <SidebarNav :items="items" />
      <main class="main-content">
        <slot />
      </main>
    </div>
  </div>
</template>

<script setup lang="ts">
import PageHeader from '@/components/PageHeader.vue';
import SidebarNav from '@/components/SidebarNav.vue';
import { defineProps } from 'vue';

const props = defineProps({
  title: {
    type: String,
    required: true
  },
  items: {
    type: Array as () => Array<{ path: string; title: string; icon?: string }>,
    required: true
  }
});
</script>

<style scoped>
.movie-container {
  width: calc(100vw - 62px);
  padding: 20px;
}

.content-wrapper {
  display: flex;
  gap: 20px;
  margin-top: 20px;
}

.main-content {
  flex: 1;
  min-height: calc(100vh - 180px);
}

/* 响应式布局调整 */
@media (max-width: 768px) {
  .movie-container {
    padding: 10px;
  }

  .content-wrapper {
    flex-direction: column;
    gap: 10px;
  }

  .main-content {
    min-height: auto;
    margin-top: 10px;
  }
}
</style>